home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / inventor / models / lightManip.iv < prev    next >
Encoding:
Text File  |  1994-08-02  |  824 b   |  37 lines

  1. #Inventor V2.0 ascii
  2. # Self Manipulating SpotLight
  3. TransformSeparator {
  4.    Separator {
  5.       BaseColor { rgb 1 0 0 }
  6.       DEF PROF_PT_DRAGGER Translate2Dragger {
  7.          translation 0.5 0 0
  8.          translator DEF DRAG_CUBE Separator {
  9.             Cube { width .2 height .2 depth .2 }
  10.          }
  11.          translatorActive DEF DRAG_YELLOW_CUBE Separator {
  12.             BaseColor { rgb 1 1 0 }
  13.             Cube { width .2 height .2 depth .2 }
  14.          }
  15.       }
  16.    }
  17.    Translation {
  18.       translation 0 0 0 = DEF CALC Calculator {
  19.             a 0.5
  20.             A = USE PROF_PT_DRAGGER.translation 
  21.             expression [
  22.                 "oa = a",
  23.                 "oA = vec3f( A[0]-a, A[1], A[2] )"
  24.                 ]
  25.         } . oA
  26.    }
  27.    Cylinder {
  28.       parts (SIDES | TOP)
  29.       radius = USE CALC . oa
  30.       height 2
  31.    }
  32.    SpotLight {
  33.       location 0 0 0
  34.       direction 0 -1 0
  35.    }
  36. }
  37.